This invention relates to an apparatus and a method for reading an optical code. More particularly, the invention relates to an apparatus and a method for reading an optical code within a preset distance range.
As is known, optical codes can be read by means of either stationary or portable reading apparatus. In either cases, the apparatus include a casing with a reading window through which a means of illuminating a code to be read, and a means of reading the image of the code being read by detecting light scattered therefrom and converting it to electric signals, are both arranged to act. The detection means for converting the light signal to an electric signal may be of different types; in general, a so-called CCD (Charge-Coupled Device) is used which comprises an array of a very large number of light-sensitive elements.
Reading apparatus of the above-described type have a drawback in that they can only provide a correct reading of the optical codes within a limited distance range; this restricts substantially their applicability.
A problem to be solved in code reading as effected by a human operator and in automatic object sorting and handling systems, is that of identifying and classifying with a single apparatus objects wherein the distance between the reading apparatus and the optical code can considerably vary. In this situation, the use of an apparatus as above described is disadvantageous, since the apparatus is not always capable of correctly focusing on the object codes to be identificated.
The underlying technical problem of this invention is that of enabling proper reading of optical codes placed at varying distances within a broad range of distances, using an apparatus of simple and low-cost construction.
Thus, the present invention provides, according to a first aspect thereof, an optical code reading apparatus which comprises:
a casing;
a reading window open into the casing;
an illuminating means, housed within the casing, and arranged to act on an optical code to be read through the reading window;
a detection means, housed within the casing and responsive to light scattered from the illuminated optical code into the casing through the reading window;
an objective lens having an optical axis, the objective lens being housed within the casing between the reading window and the detection means, and being located to pick up light scattered from the illuminated optical code and project the picked-up light onto the detection means, wherein the detection means comprises a plurality of light-sensitive elements capable of converting said light to electric signals representing the light image, characterized in that the illuminating means comprises a first array of light sources which are active in a first illumination configuration, and at least a second array of light sources which are active in at least a second illumination configuration different from the first.
Thus, an apparatus for reading remotely placed optical codes is provided which is capable of reading a code from a fixed position as well as within a broad range of distances.
For this purpose, the apparatus of the invention has a field depth which is considerably greater than that of conventional reading apparatus, and is therefore particularly suitable for reading optical codes within a broad range of distances. The improved field depth is achieved by providing the reading apparatus with a plurality of arrays of light sources which can be selectively activated to define a plurality of different illumination configurations, such that the optical code can be illuminated and focused in an optimum manner at any values of the distance of the code from the reading apparatus.
Advantageously, the first array of light sources comprises a plurality of light source pairs, each pair in turn comprising respective light sources symmetrically arranged with respect to the optical axis of the objective lens and aligned along a substantially perpendicular direction to said optical axis, said light sources lying in a first emission lay intersecting the optical axis and the light-sensitive elements of the detection means. This allows each portion of an optical code being illuminated by the first array of light sources to be projected through the objective lens onto the light-sensitive elements, regardless of the distance between the optical code and the reading apparatus, thereby to detect the light scattered from the code and convert it to electric signals.
Advantageously, the plurality of light source pairs comprises a pair of outward sources disposed in an offset position from the optical axis of the objective lens by an angle xcex1, and a pair of inward sources disposed in an offset position from the optical axis of the objective lens by an angle xcex2, smaller than the angle xcex1. Even more advantageously, the angle xcex1 is in the range of about 15xc2x0 to about 18xc2x0, and the angle xcex2 is in the range of about 30 xc2x0 to about 6xc2x0. In this way, the whole optical code can be suitably illuminated along its extension, even when placed at a considerable distance away from the reading apparatus.
In a specially advantageous embodiment, the apparatus of the invention further comprises a means for confining the light beam from the first array of light sources within a predetermined reading area. Preferably, this means comprises a ring-shaped masking element associated with the casing at the location of the reading window and having a substantially straight inward edge, set at an angle substantially equal to xcex1 with respect to the optical axis of the objective lens. As such, a confined light beam can be obtained which has a well defined shape and an extension substantially equal to that of the vision field of the detection means; this contributes to ensuring optimum illumination of the whole optical code at any values of distance between code and reading apparatus, thereby increasing the reading reliability.
The aforementioned advantages are also achieved by the provision, in the reading apparatus, of a holder element for the plurality of light source pairs which is formed with respective seats for said light sources, said seats having respective side walls shaped to confine the light beam from each source within the predetermined reading area. Advantageously, said side walls also function to screen off the detection means, thereby preventing any spurious rays issued from one of the light sources or reflected from a protective glass pane covering the reading window in the casing, from interfering with the scattered light from the code and therefore affecting the reading.
According to one embodiment of the invention, the detection means comprises a linear CCD. In this case, the responsive region of the detection means is represented by a line lying on the aforesaid first emission lay.
Advantageously, the apparatus of the invention further comprises a means for widening the emission angle of the light beam from the first array of light sources along the direction of alignment of said first array of light sources, and narrowing the emission angle of the light beam from the first array of light sources along the perpendicular direction to the first emission lay. Preferably, this means comprises a pair of converging lenses housed within the casing at symmetrical locations with respect to the optical axis of the objective lens between the first array of light sources and the reading window. Thus, these lenses will widen and flatten the light beam from the first array of light sources to give it a comparable shape to that of the responsive region of the detection means, thereby improving the reading reliability.
Advantageously, the second array of light sources comprises a plurality of second light sources having a lower light intensity than the sources in the first array of light sources. These sources are intended for illuminating the optical code when the latter locates closer to the reading apparatus.
Advantageously, the second light sources are housed within the casing symmetrically with respect to the optical axis of the objective lens so as to be aligned to one another in a second emission lay, different from the first one. Preferably, the second emission lay is lower than the first emission lay and the second light sources are housed within the casing centrally with respect to the first array of light sources. The peculiar layout of the second light sources ensures optimum illumination of the code even at near-zero distance of the code from the reading apparatus.
In this case, the light beam issuing from the first array of light sources would have a minimum of light intensity at the central area, because of the gap existing between the two inward light sources in the first array of light sources wherein the objective lens is placed, and a maximum of light intensity at the peripheral areas, thus impairing proper acquisition of the code image. This problem is overcome by activating the second array of light sources; when activated, these light sources will mainly illuminate the above-mentioned central portion, thereby optimizing the overall illumination along the whole optical code.
Preferably, the first array of light sources comprises two pairs of discrete plastics LEDs, and the second array of light sources comprises four SMD plastics LEDs.
The transition from one illumination configuration to the other (and hence activating the light sources in the second array) is effected according to an operational parameter indicating the conditions of the reading operation.
In a first embodiment, the apparatus of this invention comprises a means for measuring the distance of the optical code to be read from the reading apparatus, and a means for activating said first and at least second arrays of light sources according to the distance measured.
Thus, the operational parameter, whereby a decision is made as to whether the illumination configuration should be changed, is the distance between the optical code to be read and the reading apparatus. The reading apparatus preferably comprises a device for measuring the distance (e.g. of the modulated laser light type as disclosed in Patent Application EP-A-0652530 by this Applicant) which is operatively linked to a microprocessor adapted to process the light scattered from the illuminated code to calculate the distance value from the code, so as to select an optimum illumination configuration from a plurality of preset illumination configurations.
In a second embodiment, the apparatus of this invention comprises means for detecting the light intensity outline of the scattered light from the optical code, a means for comparing this outline with a reference outline, and a means for activating said first and at least second arrays of light sources according to the difference between the detected outline and the reference outline. The operational parameter whereby a decision is made as to whether to change the illumination configuration is, therefore, the light intensity outline of the code. The reading apparatus comprises, in particular, an envelope extractor, of a type known, which is operatively linked to a control unit arranged to compare the of light intensity outline scattered from the code with the reference outline, and accordingly select an optimum illumination configuration from a plurality of preset illumination configurations.
In a preferred embodiment, the apparatus of this invention advantageously includes a means of decoding the optical code. Preferably, the apparatus further includes a means of activating said first and at least second arrays of light sources according to the results of decoding attempts. The operational parameter whereby a decision is made as to whether the illumination configuration should be changed is, in this case, the number of unsuccessful decoding attempts made.
Preferably, the means for activating said first and at least second arrays of light sources comprises a microprocessor, the apparatus further including a means of amplifying the electric signals generated by the detection means and means of converting the amplified electric signals to digital signals to be delivered to the microprocessor. In particular, the microprocessor inspect the readings that fail to produce a decoding, class them, and accordingly select an optimum illumination configuration from a plurality of preset illumination configurations.
According to a preferred embodiment, the apparatus of the invention includes a means of varying the amplification level of the electric signals generated by the detection means. In this way, the electric signals generated by the detection means can be digitalized even when they are too weak (such as because generated from a code located on a far surface and/or having low contrast) or too strong (such as because generated from a code located on a near surface and/or having high contrast).
Preferably, the conversion means comprises a main digitalizer having a preset sensitivity and an auxiliary digitalizer whose sensitivity is higher than that of the main digitalizer. Advantageously, the two digitalizers are complementary ones; in fact, the main digitalizer is characterized by low signal distortion and is specially effective to digitalize signals having a wide dynamic range (e.g., for bar codes, signals wherein the difference in voltage level between the bar element and the space element is large), while the auxiliary digitalizer is specially effective to digitalize signals having a dynamic range which may be quite narrow, although with a higher signal distortion. Thus, the electric signals generated by the detection means in the different operative conditions in which the reading is carried out can be correctly digitalized, thereby improving the performance level of the reading apparatus.
According to a second aspect, this invention provides a method of reading an optical code by an apparatus comprising a means of illuminating an optical code to be read and means of detecting light scattered from the illuminated optical code, which method comprises the following steps:
a) illuminating an optical code to be read so as to define a read scan;
b) picking up the light scattered from the illuminated optical code on the detection means;
c) converting the picked-up light to electric signals representing the light image;
characterized in that step a) of illuminating the optical code in turn comprises the following steps:
a1) acquiring an operational parameter indicating specific conditions of the reading operation;
a2) activating, according to the acquired operational parameter, a first array and/or at least a second array of light sources so as to illuminate the code according to respective preset illumination configurations.
The method of the invention advantageously enables an optimum illumination configuration to be selected to suit specific conditions of operation, thereby enhancing the reliability of the reading carried out.
In a first embodiment of the inventive method, step a1) of acquiring the operational parameter comprises a step of measuring the distance of the code to be read from the reading apparatus.
In a second embodiment of the inventive method, step a1) of acquiring the operational parameter comprises the following steps:
detecting a light intensity outline of the scattered light from the optical code;
comparing said outline with a reference outline;
controlling the emissions from the light sources in the first and/or second arrays of light sources according to the difference between the detected outline and the reference outline.
In a specially advantageous embodiment of the method according to the invention, the operational parameter whereby a decision is made as to whether the illumination configuration should be changed is the number of unsuccessful decoding attempts.